﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data.Entity.ModelConfiguration;
using System.ComponentModel.DataAnnotations.Schema;

using SMG.Domain.Model.Program;


namespace Infrastructure.Repository.EntityFramework.Program
{
    public class ChannelConfiguration : EntityTypeConfiguration<Channel>
    {

        public ChannelConfiguration()
        {
            ToTable("Tab_channels");
            HasKey<long>(p => p.ID);
            Property(p => p.ID).HasColumnName("id");
            Property(p => p.ChannelId).HasColumnName("channel_Id");
            Property(p => p.ChannelName).HasColumnName("channel_name");
            Property(p => p.AutoLoadTime).HasColumnName("auto_loadtime");
            Property(p => p.AmdDelayTime).HasColumnName("cmd_delaytime");
            Property(p => p.CueBeforeTime).HasColumnName("cue_beforetime");
            Property(p => p.ZBPathFirst).HasColumnName("zb_path1");
            Property(p => p.ZBPathSecond).HasColumnName("zb_path2");
            Property(p => p.FolderListMaster).HasColumnName("folder_list_master");
            Property(p => p.FolderListSlave).HasColumnName("folder_list_slave");
            Property(p => p.FolderMediaMaster).HasColumnName("folder_media_master");
            Property(p => p.FolderMediaSlave).HasColumnName("folder_media_slave");
            Property(p => p.FolderMediaStateMaster).HasColumnName("folder_media_state_master");
            Property(p => p.FolderMediaStateSlave).HasColumnName("folder_media_state_slave");
            Property(p => p.DeviceIdsMaster).HasColumnName("deviceIds_master");
            Property(p => p.DeviceIdsSlave).HasColumnName("deviceIds_slave");
            Property(p => p.AutoUpdate).HasColumnName("auto_update");
            Property(p => p.AutoLoad).HasColumnName("auto_load");
            Property(p => p.ChannelDesc).HasColumnName("channel_desc");
        }
    }
}
